home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Libraries
/
VideoToolbox 95.04.18
/
VideoToolboxSources
/
Exponential.c
< prev
next >
Wrap
Text File
|
1994-08-01
|
299b
|
15 lines
/* Exponential.c
Routines related to the exponential probability distribution.
Also see: Binomial.c, ChiSquare.c, Normal.c, Uniform.c
*/
#include <math.h>
double ExponentialPdf(double x);
double ExponentialPdf(double x)
// Mean and variance are 1.
{
if(x<0.0)return 0.0;
else return exp(-x);
}